package com.bml.architect.sentinel.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.bml.architect.sentinel.controller.ExceptionUtil;
import org.springframework.stereotype.Service;

/**
 * @author: baiml
 * @Title: UserService
 * @ProjectName: 中台技术平台
 * @Depart 中台研发部
 * @Description:
 * @date: 2021/4/21 13:05
 */
@Service
public class UserService {


    @SentinelResource(value = "getUser",blockHandler = "handleException",blockHandlerClass = ExceptionUtil.class
    ,fallback = "fallback",fallbackClass = ExceptionUtil.class)
    public String getUser(){
        System.out.println("getUser....");
        return "request is ok ";
    }
}
